package com.multids;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        String db = DataSourceHolder.getDBType();
        System.out.println("使用数据源：" + db);
        return db;
    }
}
